home *** CD-ROM | disk | FTP | other *** search
/ Software Vault: The Games Collection 1 / software vault.zip / software vault / CDR10 / YICN23.ZIP / INCLUDE / XBMTOOLS.H < prev    next >
Text File  |  1992-11-08  |  1KB  |  54 lines

  1. /*-----------------------------------------------------------------------
  2. ;
  3. ; XPOINT - header file
  4. ;
  5. ;
  6. ;
  7. ; ****** XLIB - Mode X graphics library                ****************
  8. ; ******                                               ****************
  9. ; ****** Written By Themie Gouthas                     ****************
  10. ;
  11. ; Macros written by Mathew Mackenzie
  12. ;
  13. ; egg@dstos3.dsto.gov.au
  14. ; teg@bart.dsto.gov.au
  15. ;
  16. ;  Terminology & notes:
  17. ;         VRAM ==   Video RAM
  18. ;         SRAM ==   System RAM
  19. ;         X coordinates are in pixels unless explicitly stated
  20. ;
  21. ;-----------------------------------------------------------------------*/
  22.  
  23. #ifndef _XBMTOOLS_H_
  24. #define _XBMTOOLS_H_
  25.  
  26. #define BM_WIDTH_ERROR 1
  27.  
  28. #define LBMHeight(lbitmap) lbitmap[1]
  29. #define LBMWidth(lbitmap) lbitmap[0]
  30. #define PBMHeight(pbitmap) pbitmap[1]
  31. #define PBMWidth(pbitmap) (4*pbitmap[0])
  32.  
  33. #define LBMPutPix(x,y,lbitmap,color)  \
  34.     (lbitmap[2 + (x) + (y) * (LBMHeight(lbitmap))] = color)
  35.  
  36. #define LBMGetPix(x,y,lbitmap)  \
  37.     (lbitmap[2 + (x) + (y) * (LBMHeight(lbitmap))])
  38.  
  39.  
  40.  
  41. /* FUNCTIONS =========================================================== */
  42.  
  43. extern int x_pbm_to_bm(           /* Convert from planar bitmap to linear */
  44.      char far * source_pbm,
  45.      char far * dest_bm);
  46.  
  47. extern int x_bm_to_pbm(           /* Convert from linear bitmap to planar */
  48.      char far * source_pbm,
  49.      char far * dest_bm);
  50.  
  51. #endif
  52.  
  53.  
  54.